package com.RyanRestaurant.Mapper;

import com.RyanRestaurant.Entity.Food;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
import java.util.Map;

/**
 * Food的数据访问层接口
 */

@Mapper
public interface FoodMapper {

    public abstract Integer totalCount(String title); //计算总数

    public abstract List<Food> getFoods(Map<String, Object> map); //分页查询

    public abstract Integer addFood(Food food); //新增菜品

    public abstract Food getFoodById(Integer id); //根据ID查询Food

    public abstract Integer updateFood(Food food); //更新菜品

    public abstract Integer deleteFood(Integer id); //删除菜品

    public abstract Integer activeFood(Integer id); //删除菜品

    public abstract Integer menuTotalCount(Map<String, Object> map); //计算客户端界面下的总数

    public abstract List<Food> menuGetFoods(Map<String, Object> map); //客户端界面下的分页查询
}
